<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- v-model 修饰符的使用 -->
    <div id="app">
        <div>
            <input type="text" v-model.lazy="lazyData">
        </div>
        <div> {{ lazyData }} </div>
        <div>
            number修饰符:
            <input type="number" v-model.number="numberData">
        </div>
        <div>number修饰符的内容:{{ typeof numberData }}</div>
        <div>
            trim修饰符:
            <input type="text" v-model.trim="trimData">
            <button @click="cosTrimData">打印</button>
        </div>
    </div>
    <script src="../js/vue.js"></script>
    <script>
        const app = new Vue({
            el:'#app',
            data(){
                return {
                    lazyData:'王某人',
                    numberData:123,
                    trimData:''
                }
            },
            methods:{
                cosTrimData(){
                    console.log(this.trimData)
                }
            }
        })
    </script>
</body>
</html>